package week8;

public class Transport {
    private String name;
    private  int speed;

    public Transport(String name,int speed){
        this.name=name;
        this.speed=speed;
    }
    public  Transport(){

    }

    public  void setName(String name){
        this.name=name;

    }

    public String getName() {
        return name;
    }

    public  int getSpeed(){
        return speed;
    }

    public void moveWay(){
        System.out.println("请完善这个交通工具的移动方式");

    }

    public  void showInfo(){
        System.out.println("交通方式是"+name);
        moveWay();
        System.out.println(name+"的速度是"+speed);
    }
}

